package com.shop.cereshop.agent.dao.user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.cereshop.agent.page.user.AgentUserPayVO;
import com.shop.cereshop.agent.page.user.CereAgentUserVO;
import com.shop.cereshop.agent.param.user.AgentUserInfoDTO;
import com.shop.cereshop.agent.param.user.LoginDTO;
import com.shop.cereshop.commons.domain.agent.CereAgentPrivate;
import com.shop.cereshop.commons.domain.agent.CereAgentUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CereAgentUserDAO extends BaseMapper<CereAgentUser> {
    CereAgentUser selectUserByPhone(@Param("phone") String phone);


    CereAgentPrivate selectCereAgentUserByIdAndRoleType(@Param("agentUserId") Long agentUserId,@Param("lastLoginType") Integer lastLoginType);

    Integer updateLoinPassword(@Param("param") LoginDTO param);

    CereAgentUserVO getRoleById(@Param("agentUserId") Long agentUserId,@Param("roleType") Integer roleType);

    void updateLastLoginType(@Param("agentUserId") Long agentUserId,@Param("roleType") Integer roleType);

    AgentUserPayVO getUserInfo(AgentUserInfoDTO agentUserInfoDTO);
}
